package com.gprinter.sample;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;

import com.sample.R;

public class HomeActivity extends Activity implements View.OnClickListener {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_home);
        initViews();
    }

    private void initViews() {
        findViewById(R.id.btn_setting).setOnClickListener(this);
        findViewById(R.id.btn_no_setting).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        Intent intent = new Intent();
        switch (v.getId()) {
            case R.id.btn_setting:
                intent.setClass(HomeActivity.this, SettingPrinterActivity.class);
                break;
            case R.id.btn_no_setting:
                intent.setClass(HomeActivity.this, WebActivity.class);
                break;
        }
        startActivity(intent);
    }
}
